<!--事故档案详情-->
<template>
  <view class="order">
    <!--顶部个人信息栏-->
    <!-- <view>
			<u-row style="margin-top: 20px;">
			  <u-button @click="show = true">查询</u-button>
			</u-row>
		</view> -->
    <view class="content-section">
      <text class="u-collapse-content">
        <view>

            <view style="margin-bottom: 10px;">
              <view align="left" class="align-text-td">事故类别<text style="margin-left: 50px;">{{accident_type[sgxqData.type]}}</text></view>
            </view>
            <view style="margin-bottom: 10px;">
              <view align="left" class="align-text-td">事故等级
							<text style="margin-left: 50px;">{{accident_level[sgxqData.level]}}</text>
							</view>
            </view>
            <view style="margin-bottom: 10px;"> 
              <view align="left" class="align-text-td">事故名称
							<text style="margin-left: 50px;">{{sgxqData.name}}</text>
							</view>
            </view>
            <view style="margin-bottom: 10px;">
              <view align="left" class="align-text-td">事故企业
							<text style="margin-left: 50px;">{{sgxqData.enterpriseInfoName}}</text>
							</view>
            </view>
            <view style="margin-bottom: 10px;">
              <view align="left" class="align-text-td">事故时间
							<text style="margin-left: 50px;">{{parseInt(sgxqData.accidentTime) | dateFormat}}</text>
							</view>
            </view>

            <view style="margin-bottom: 10px;">
              <view align="left" class="align-text-td">附件
							<text>{{sgxqData.filePath}}
							</text>
							</view>
            </view>
        </view>
      </text>
    </view>
  </view>
</template>

<script>
import storage from "@/utils/storage";
import {sgxqList} from '@/api/my/sgxq.js'
	import { mapState } from 'vuex'//引入mapState
export default {
  data() {
    return {
			sgxqData:null,
      show: false,
      value: "",
      range: [],
      name: "刘德华",
      // name: this.$store.state.user.name,
      version: getApp().globalData.config.appInfo.version,
    };
  },

  computed: {},
	onLoad(option) {
		this.getsgxqList(option.id)
	},
		computed:{
			...mapState({
				accident_type: state => state.sjzd.sjzdList.accident_type,
				accident_level: state => state.sjzd.sjzdList.accident_level,
			})
		},
  methods: {
    tabClick() {
      this.$tab.navigateTo("/pages/my/systemmessage/index");
    },
		
		// 事故详情数据
		getsgxqList(sgId) {
			sgxqList(sgId).then((result)=>{
				const data = result.data
				this.sgxqData = data
			}).catch((err)=>{console.log(err)})
		},
		
  },
};
</script>

<style lang="scss" scoped>
page {
  background-color: #f5f6f7;
}

.mine-container {
  width: 100%;
  height: 100%;
  padding: 10px 10px 45px 10px;

  .header-section {
    padding: 22px 0px 22px 15px;
    background-color: #fff;
    color: #000;
    border-radius: 4px 4px 0px 0px;

    .login-tip {
      font-size: 18px;
      margin-left: 10px;
    }

    .cu-avatar {
      border: 2px solid #eaeaea;

      .icon {
        font-size: 40px;
      }
    }

    .user-info {
      margin-left: 15px;

      .u_title {
        font-size: 20px;
        font-family: PingFangSC-Semibold, PingFang SC;
        font-weight: 600;
        color: #343434;
        line-height: 62rpx;
      }

      .u_title_n {
        font-size: 16px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #595959;
        line-height: 22px;
      }
    }
  }

  .content-section {
    position: relative;

    .mine-actions {
      margin: 15px 15px;
      padding: 20px 0px;
      border-radius: 8px;
      background-color: white;

      .action-item {
        .icon {
          font-size: 28px;
        }

        .text {
          display: block;
          font-size: 13px;
          margin: 8px 0px;
        }
      }
    }
  }
}

.handle-to {
  width: 108px;
  height: 36px;
  position: absolute;
  right: 0;
  background-color: #123;
  background: linear-gradient(to right, #2a62a5, #5192df);
  border: 1px solid #004ca7;
  border-right: none;
  border-radius: 20px 0px 0px 20px;
  margin-top: 36rpx;

  .textone {
    color: #fff;
    margin-left: 30rpx;
  }
}

.buttom-ks {
  height: 78px;
  background-color: #123;
  background: linear-gradient(to right, #e4eaf0, #e4eaf0);
  border-radius: 5px;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  border: 1px solid #b0d4ff;

  image {
    width: 440rpx;
    height: 52rpx;
  }

  text {
    font-size: 20px;
    font-family: Roboto-BoldItalic, Roboto;
    font-weight: normal;
    color: #225ea4;
    line-height: 24px;
    font-weight: 700;
  }
}

.vac {
  font-size: 14px;
  color: #225ea4;
  font-style: italic;
}

.menu-list {
  margin: 10px 0rpx 0rpx 0rpx;
}

.list-cell:first-child {
  border-radius: 4px 4px 4px 4px;
}

.list-cell {
  padding: 21px 16px;
}

.v-top {
  width: 10px;
  height: 18px;
  background-color: #123;
  border-radius: 0px 50px 50px 0px;
  margin-left: -15px;
  background: #9ebadb;
}

.v-buttom {
  width: 90px;
  height: 25px;
  font-size: 18px;
  font-family: PingFangSC-Medium, PingFang SC;
  font-weight: 700;
  color: rgba(52, 52, 52, 0.85);
  line-height: 25px;
  text-align: left;
  margin-left: 15px;
}

.v-fb {
  font-size: 14px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #8c8c8c;
  line-height: 24px;
  position: absolute;
  right: 28px;
  width: 154px;
  text-align: right;
}

.list-vcell {
  margin-bottom: 10px;
  background: #ffffff;
  box-shadow: 0px 4px 6px 0px rgba(123, 149, 149, 0.08);
  border-radius: 4px;
}

.uni-image {
  width: 320px;
  height: 0px;
  display: inline-block;
  overflow: hidden;
  position: relative;
}

.unioi {
  width: 140px;
  height: 30px;
}

.order {
  width: 710rpx;
  background-color: #ffffff;
  margin: 20rpx auto;
  border-radius: 8rpx;
  box-sizing: border-box;
  padding: 20rpx;
  font-size: 28rpx;
  letter-spacing: 2rpx;
  box-shadow: 0px 3px 10px 0px rgba(148, 177, 188, 0.38);
}

.u-page {
  padding: 0;

  &__item {
    &__title {
      color: $u-tips-color;
      background-color: $u-bg-color;
      padding: 15px;
      font-size: 15px;

      &__slot-title {
        color: $u-primary;
        font-size: 14px;
      }
    }
  }
}

.u-collapse-content {
  color: $u-tips-color;
  font-size: 14px;
  height: 210px;
}

.text {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}

.uni-px-5 {
  padding-left: 10px;
  padding-right: 10px;
}

.uni-pb-5 {
  padding-bottom: 10px;
}

.uni-group {
  display: flex;
  align-items: center;
}

.text-two {
  color: #457ba5;
}

::v-deep .u-collapse-item__content__text {
  padding: 5px 10px !important;
  line-height: 22px;
}

::v-deep .u-collapse-content[data-v-06285ef4] {
  color: #343434;
}

::v-deep .uni-select {
  background-color: #fff !important;
  border: 0px solid #fff !important;
}

::v-deep .uni-select__input-placeholder {
  color: #343434;
  font-size: 14px;
}

.align-text {
  font-size: 14px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #848484;
}

.align-text-td {
  font-size: 14px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #343434;
}

::v-deep .u-cell__body {
  background-color: #f2f2f2;
}

.example-body {
  flex-direction: column;
  flex: 1;
}

.content {
  padding: 15px;
}

.text {
  font-size: 14px;
  color: #666;
  line-height: 20px;
}

.button {
  // margin-top: 10px;
  margin: 10px;
  margin-bottom: 0;
}

.text-three {
  color: #3a9b54;
  font-size: 12px;
}

.table--border {
  border: 0px #ebeef5 solid;
  border-buttom: 1px soild #123;
}

.uni-table-th {
  border-bottom: 1px #ebeef5 solid;
}

.uni-table-td {
  border-bottom: 1px #ebeef5 solid;
}
</style>
